package net.pimpas.persistence.hibernate.scanner;

import java.util.ArrayList;
import java.util.List;

import net.pimpas.core.scanner.Scanner;
import net.pimpas.core.scanner.exception.ScannerException;
import net.pimpas.persistence.hibernate.visitor.EntityVisitor;


public class HibernateEntityScanner implements Scanner<Class> {

	private List<Class> entitys;

	public HibernateEntityScanner() {
		this.setEntitys(new ArrayList<Class>());
	}

	public String getName() {
		return this.getClass().getSimpleName();
	}

	public List<Class> getResult() {
		return this.getEntitys();
	}

	public void scan() throws ScannerException {
		// get from visitor
		this.setEntitys(EntityVisitor.entitys);
	}
	
	private List<Class> getEntitys() {
		return entitys;
	}

	private void setEntitys(List<Class> entitys) {
		this.entitys = entitys;
	}
}